//
//  UIView+ZMLayout.h
//  ZMKitDemo
//
//  Created by zm on 2018/6/13.
//  Copyright © 2018年 zm. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (ZMLayout)

@property (nonatomic) CGFloat zm_height;
@property (nonatomic) CGFloat zm_width;
@property (nonatomic) CGPoint zm_origin;
@property (nonatomic) CGSize  zm_size;
@property (nonatomic) CGFloat zm_centerX;
@property (nonatomic) CGFloat zm_centerY;
@property (nonatomic) CGFloat zm_x;
@property (nonatomic) CGFloat zm_y;
@property (nonatomic) CGFloat zm_left;
@property (nonatomic) CGFloat zm_right;
@property (nonatomic) CGFloat zm_top;
@property (nonatomic) CGFloat zm_bottom;

@property (nonatomic, assign) UIEdgeInsets touchExtendInset;

- (UIView *)topSuperView;


#pragma mark Equal
- (void)heightEqualToView:(UIView *)view;
- (void)widthEqualToView:(UIView *)view;
- (void)sizeEqualToView:(UIView *)view;
- (void)centerXEqualToView:(UIView *)view;
- (void)centerYEqualToView:(UIView *)view;
- (void)centerEqualToView:(UIView *)view;

- (void)topEqualToView:(UIView *)view;
- (void)bottomEqualToView:(UIView *)view;
- (void)leftEqualToView:(UIView *)view;
- (void)rightEqualToView:(UIView *)view;

#pragma mark iPhoneX
- (CGFloat)safeAreaBottomGap;
- (CGFloat)safeAreaTopGap;
- (CGFloat)safeAreaLeftGap;
- (CGFloat)safeAreaRightGap;

@end
